package com.iminutes.dao.impl;

import com.iminutes.dao.GoodDao;

import java.lang.reflect.Array;
import java.util.*;

/**
 * @Description TODO
 * @Author liyuhua
 * @Date 2021/8/5 15:40
 **/
public class GoodDaoImpl implements GoodDao {
    //dao层其实是从数据库返回查询信息
    //在这里我们模拟5种集合类型数据注入
    private ArrayList list;
    private Properties prop;
    private int[] arr;
    private HashSet hset;
    private HashMap hmap ;


    @Override
    public void getGood() {
        for (int i=0;i<list.size();i++){
            System.out.println(list.get(i));
        }
        System.out.println(prop.get("name"));
        System.out.println(arr[0]);

        HashMap hm = getHmap();
        for (Object t:hm.keySet()){
            System.out.println("{hmap:}::"+hm.get(t));
        }

    }


    public ArrayList getList() {
        return list;
    }

    public void setList(ArrayList list) {
        this.list = list;
    }

    public Properties getProp() {
        return prop;
    }

    public void setProp(Properties prop) {
        this.prop = prop;
    }

    public int[] getArr() {
        return arr;
    }

    public void setArr(int[] arr) {
        this.arr = arr;
    }

    public HashSet getHset() {
        return hset;
    }

    public void setHset(HashSet hset) {
        this.hset = hset;
    }

    public HashMap getHmap() {
        return hmap;
    }

    public void setHmap(HashMap hmap) {
        this.hmap = hmap;
    }
}
